import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import '@/assets/css/base.css'
import '@/assets/css/public.css'
import '@/assets/css/animation.css'
import '@/assets/css/content.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import '@/assets/font/iconfont.css'
import 'lib-flexible/flexible.js'
import CooieTool from './util/cookie'
import { createMetaManager } from 'vue-meta'
import dayjs from 'dayjs'
import { createPinia } from 'pinia'
import translate from 'i18n-jsautotranslate'


translate.setUseVersion2() //设置使用v2.x 版本
translate.selectLanguageTag.show = false //是否显示切换栏
translate.listener.start()
translate.ignore.class.push('selectNo');



const pinia = createPinia()

const app = createApp(App)
app.use(router)
app.use(pinia)
app.provide('dayJS', dayjs)
app.provide('translate', translate)
app.mount('#app')
app.config.globalProperties.$dayjs = dayjs

app.use(createMetaManager(false, {
  meta: { tag: 'meta', nameless: true }
}))

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.config.globalProperties.$CooieTool = CooieTool;// cookie处理

